
[Setup]
AppName=RalfDB
AppVersion=1.0
DefaultDirName={pf}\RalfDB
DefaultGroupName=RalfDB
Compression=lzma2
SolidCompression=yes
OutputDir=output   
; "ArchitecturesInstallIn64BitMode=x64" requests that the install be
; done in "64-bit mode" on x64, meaning it should use the native
; 64-bit Program Files directory and the 64-bit view of the registry.
; On all other architectures it will install in "32-bit mode".
ArchitecturesInstallIn64BitMode=x64
; Note: We don't set ProcessorsAllowed because we want this
; installation to run on all architectures (including Itanium,
; since it's capable of running 32-bit code too).

[Files]              
; Install x64 if running in 64-bit mode (x64; see above), x86.exe otherwise.   
Source: "mysql-5.5.13-winx64\*.*"; DestDir: "{app}\mysql"; Check: Is64BitInstallMode; Flags: ignoreversion recursesubdirs createallsubdirs 
Source: "mysql-5.5.13-win32\*.*"; DestDir: "{app}\mysql"; Check: not Is64BitInstallMode; Flags: ignoreversion recursesubdirs createallsubdirs  
; Install x64 if running in 64-bit mode (x64; see above), x86.exe otherwise.   
Source: "apache-tomcat-6.0.32-x64\*.*"; DestDir: "{app}\tomcat"; Check: Is64BitInstallMode; Flags: ignoreversion recursesubdirs createallsubdirs 
Source: "apache-tomcat-6.0.32-x86\*.*"; DestDir: "{app}\tomcat"; Check: not Is64BitInstallMode; Flags: ignoreversion recursesubdirs createallsubdirs
;   
Source: "start.bat"; DestDir: "{app}"; DestName: "start.bat"; 
Source: "stop.bat"; DestDir: "{app}"; DestName: "stop.bat"; 
   
[Icons]    
Name: "{group}\Start RalfDB"; Filename: "{app}\start.bat"
Name: "{group}\Stop RalfDB"; Filename: "{app}\stop.bat"
  
[Run]     
; install mysql and tomcat as services
Filename: "{app}\mysql\bin\mysqld.exe"; Parameters: "--install RalfDB_MySQL"
Filename: "{app}\tomcat\bin\service.bat"; Parameters: "install"   
Filename: "{app}\start.bat"; Description: {cm:LaunchProgram,{cm:AppName}}; Flags: nowait postinstall skipifsilent
    
[UninstallRun]   
; uninstall mysql and tomcat as services  
Filename: "{app}\stop.bat";
Filename: "{app}\mysql\bin\mysqld.exe"; Parameters: "--remove RalfDB_MySQL" 
Filename: "set"; Parameters: "CATALINA_HOME={app}\tomcat"
Filename: "{app}\tomcat\bin\tomcat6.exe"; Parameters: "//DS//RalfDB_Tomcat"

[CustomMessages]
AppName=RalfDB
LaunchProgram=Start RalfDB after finishing installation
